//
//  DetailViewController.h
//  test
//
//  Created by Jeoffrey Thirot on 12/03/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "GameDataController.h"
#import "MapView.h"
#import "TreasureMenuView.h"
#import "MenuButton.h"
#import "BTSession.h"
#import "GameOverView.h"

@interface GameViewController : UIViewController

@property (retain, nonatomic) GameDataController *gameDatas;
@property (strong, nonatomic) IBOutlet UILabel *detailDescriptionLabel;
@property (retain, nonatomic) IBOutlet MapView *mapView;
@property (retain, nonatomic) IBOutlet TreasureMenuView *treasureMenuView;
@property (retain, nonatomic) NSString *menuState;
@property (retain, nonatomic) NSString *playerName;
@property (retain, nonatomic) NSString *challengerName;
@property (assign, nonatomic) int numPlayer;
@property (retain, nonatomic) GameOverView *gameOverView;

@property (retain, nonatomic) IBOutlet MenuButton *TreasureBtn1;
@property (retain, nonatomic) IBOutlet MenuButton *TreasureBtn2;
@property (retain, nonatomic) IBOutlet MenuButton *TreasureBtn3;
@property (retain, nonatomic) IBOutlet MenuButton *TreasureBtn4;

@property (retain, nonatomic) BTSession *delegateBTSession;

- (IBAction)backAction:(id)sender;
- (void) returnHome;

- (void)setDatas;
- (IBAction)onTreasureMenuBtnTouched:(id)sender;
- (void)treasureButtonTouchedById:(NSNumber *)index;
- (void)mapAction:(int)action bySquareId:(float)squareId withDict:(NSMutableDictionary *)dict;
- (void)buryTreasureOnSquareId:(float)squareId andDict:(NSMutableDictionary *)dict;
- (void)searchChallengerTreasureBySquareId:(float)squareId andDict:(NSMutableDictionary *)dict;
- (void)hideTreasureMenu;

- (void) receiveData:(NSNotification *)notification;
- (void) disconnect:(NSNotification *)notification;
- (void) namePlayer:(NSString *)namePlayer andNumPlayer:(int)playerNum andChallengerName:(NSString *)nameChallenger;
- (BOOL) receiveIsTreasureBySquareId:(NSNumber *)squareId;
- (void)isTreasureDiscovered:(BOOL)isTreasure andSquareId:(NSNumber *)squareId;
- (void)showGameOverScreen:(BOOL)isWon;

@end
